Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.3
Why Do Templates Disappear?

Q:

I’ve created a number of templates. Then after a while, I’ve changed the base template for some of them, and suddenly my templates started to disappear. Why does this happen?

A:

Such behavior may occur when using the Change Template command on a template (shown below).

/upload/sdn5/faq/why do templates disappear/change template.gif

In general, the Change Template command changes the template that an Item is based on.  This is like moving a database record from one table to another. 

To understand why this does not have the desired effect in this case, one must first understand that a given template, for example, the News template, is actually described by a Sitecore item.  The Template Editor allows us to modify the item that describes the News template.  The item that describes the News template is based on a Sitecore system template which happens to be called Template (which is in turn based on the Sitecore Standard Template). 

Choosing the Change Template command essentially says: "I want the item that describes the News template to be based on template X."  From that point on, the item describing the News template looks like an X, not a Template, so it is not longer shown in the menu (hence its disappearance).

 The Base Template should be changed by using the _Base template field:

/upload/sdn5/faq/why do templates disappear/templates.png